import java.util.HashMap;
import java.util.Map;


public class Calculadorr {



	Map<String, String> variables = new HashMap<String, String>();

	public String play (String in){


		String[] problem = in.split(" ");

		for(int i = 0; i < 3; i++)
		{
			if(variables.containsKey(problem[i])){
				
				problem[i] = variables.get(problem[i]);
			}
		}

		if(problem[1].equals("="))
		{
			variables.put(problem[0], problem[2]);
			return "Opperation Successful";
		}

		double num1 = Double.parseDouble(problem[0]);
		double num2 = Double.parseDouble(problem[2]);

		if(problem[1].equals("+")) {

			return Double.toString(num1+num2);
		}

		if(problem[1].equals("-")){

			return Double.toString(num1-num2);
		}

		if(problem[1].equals("*")){

			return Double.toString(num1*num2);
		}

		if(problem[1].equals("/")){

			return Double.toString(num1/num2);
		}

		else{
			return "Opperation not supported";
		}
	}


}
